library(haven)
df = read_sav(file.path('data','dbp.sav'),encoding='gbk')
library(dplyr)
library(tidyr)
df_long = df %>%
  pivot_longer(cols=c("DBPBL","DBPat30min","DBPat60min"),names_to="DBP_time",values_to="DBP")
write_sav(df_long,file.path('data','dbp_long.sav'))